<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- 引入vue 包-->
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <style>
        img{
            width: 90px;
            border-radius: 50%;
        }
    </style>
</head>
<body>
    <div id="app">
        <div>
        <input v-model="initial" type="text" placeholder="..."><br>
        <img v-if="initial=='男'" src="https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=195657362,92889393&fm=26&gp=0.jpg">
        <img v-else-if="initial=='女'" src="https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=2044128775,849590818&fm=26&gp=0.jpg" alt="">

            <p v-if="initial=='男'">{{msg.text1}}</p>
            <p v-else-if="initial=='女'">{{msg.text2}}</p>
            <p v-else>{{msg.gender}}</p>

        <input v-model="initial" type="text" placeholder="..."><br>

            <div v-if="initial=='男'">
        <img  src="https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=195657362,92889393&fm=26&gp=0.jpg">
        <p >男生入口</p>
            </div>
            <div v-else-if="initial=='女'" >
                <img src="https://ss1.bdstatic.com/70cFuXSh_Q1YnxGkpoWK1HF6hhy/it/u=2044128775,849590818&fm=26&gp=0.jpg" alt="">
                <p >女生入口</p>
            </div>
            <div v-else>
                <p>请输入性别</p>
            </div>

</div>
    </div>
    <script>
        new Vue({
            el:'#app',
            data:{
                initial:'',
                msg:{
                    text1:'男生入口',
                    text2:'女生入口',
                    gender:'请输入性别'  
                }
            }
        })
    </script>
</body>
</html>